Repository navigation
fix!: preserve detail from upstream address parse errors - #1138
Open
Arowolokehinde wants to merge 1 commit into
Open
Arowolokehinde wants to merge 1 commit into
Arowolokehinde wants to merge 1 commit into
Conversation
Arowolokehinde
force-pushed
the
fix/preserve-address-parse-error-detail
branch
2 times, most recently
from
October 7, 2026 11:34
7af33d1 to
d6acb92
Compare
Arowolokehinde
force-pushed
the
fix/preserve-address-parse-error-detail
branch
from
October 7, 2026 11:35
d6acb92 to
8636ba7
Compare
Contributor
|
The error propagation itself looks correct, and I verified the generated Swift/Kotlin API impact. One question before ACKing: since these unit variants become data-carrying variants, this is a real generated-binding API break. With master currently on 3.2.0-alpha.0 and #1036 tracking breaking changes for 4.0, is this intended to land in 3.2 or should it be tracked for 4.0? |
Author
|
Thank you for the review @j-kon |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #1095
AddressParseErrordiscarded the upstream error in seven of ten arms, reporting only a generic label such as"base58 address encoding error". Every variant now carries anerror_messageholding the upstream detail:Notes to the reviewers
Why the conversion follows each error's
source()instead of relying onto_string()alone.The detail sits two levels below
ParseError::Base58. The wrapping errors use thewrite_err!macro, which leaves the source out ofDisplaywhen thestdfeature is enabled — soto_string()returns"base58 error"and nothing else, and the rest is reachable only throughsource().Scope. The issue names Base58, Bech32 and network validation. This also covers the four other arms that discard the error the same way, plus
OtherAddressParseErr, which had no payload at all. The change breaks the generated bindings either way. Happy to narrow it to the three named variants if you'd prefer.Documentation
bitcoinbitcoin::address::ParseErrorChangelog
changelog: breakingChecklists
All Submissions:
cargo fmtandcargo clippybefore committingchangelog:*labelBugfixes: